/*
 * Created on 11/22/2012 - 7:28 PM
 * 
 */
package sembr.vtk.reader;

import vtk.vtkPolyData;
import vtk.vtkXMLGenericDataObjectReader;

/**
 *
 * @author adriano
 */
public class VtkGenericReader extends ReaderBase
{
    private vtkXMLGenericDataObjectReader genericReader;
           
    public VtkGenericReader(String fileName)
    {
        setFilePath(fileName);
        genericReader = new vtkXMLGenericDataObjectReader();
        read();
    }
    
    private void read()
    {
        String fileName = getFilePath();        
        genericReader.SetFileName(fileName);
        genericReader.Update();
    }
    
    @Override
    public vtkPolyData getPolyData() 
    {           
        return (vtkPolyData)genericReader.GetOutput();
    }   
}
